﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_BBSAddItem]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_BBSAddItem];
GO
CREATE PROCEDURE [dbo].[sproc_BBSAddItem]
    @board_id int,
    @title nvarchar(300),
    @content ntext,
    @sender nvarchar(100),
    @ip nvarchar(50),
    @bulletin bit,
    @sysbulletin bit,
    @desktop bit
/*

=======================================================
功能:    发帖子
参数;
    @board_id int,            :    版块ID
    @title nvarchar(300)        :    帖子主题
    @content ntext            :    帖子内容
    @sender nvarchar(100)        :    发帖人
    @ip nvarchar(50)            :    发帖人IP
    @bulletin bit            :    公告
    @sysbulletin bit        :    系统公告
    @desktop            :    桌面显示
=======================================================

*/
AS
SET NOCOUNT ON
INSERT INTO uds_bbs_forumitem (board_id,title,content,sender,send_time,ip,bulletin,sysbulletin,desktop)
    VALUES(@board_id,@title,@content,@sender,getdate(),@ip,@bulletin,@sysbulletin,@desktop)
SELECT @@IDENTITY AS board_id    
return @@identity
SET NOCOUNT OFF